﻿using RockBus.ConfigurationService.Interfaces;
using RockBus.DataContracts;
using RockBus.Logging.Interfaces;
using System;
using System.Reflection;
using System.ServiceModel;

namespace RockBus.Services
{
    public partial class CbrService :
        IConfigurationService,
        IConfigurationServiceOneWay
    {
        #region IConfigurationService

        SubscriberConfiguration IConfigurationService.GetSubscriberConfiguration()
        {
            return ((IConfigurationService)this.ConfigurationService).GetSubscriberConfiguration();
        }

        RockBusAck IConfigurationService.AddOrUpdateSubscribers(AddOrUpdateSubscribersRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).AddOrUpdateSubscribers(request);
        }

        RockBusAck IConfigurationService.RemoveSubscribers(RemoveSubscribersRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).RemoveSubscribers(request);
        }

        RockBusAck IConfigurationService.RemoveSubscriptions(RemoveSubscriptionsRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).RemoveSubscriptions(request);
        }

        PublisherConfiguration IConfigurationService.GetPublisherConfiguration()
        {
            return ((IConfigurationService)this.ConfigurationService).GetPublisherConfiguration();
        }

        AddOrUpdatePublishersResponse IConfigurationService.AddOrUpdatePublishers(AddOrUpdatePublishersRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).AddOrUpdatePublishers(request);
        }

        RockBusAck IConfigurationService.RemovePublishers(RemovePublishersRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).RemovePublishers(request);
        }

        RockBusAck IConfigurationService.RemoveReceivePorts(RemoveReceivePortsRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).RemoveReceivePorts(request);
        }

        public RockBusAck RemoveAllSubscribers(RemoveAllSubscribersRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).RemoveAllSubscribers(request);
        }

        public RockBusAck RemoveAllPublishers(RemoveAllPublishersRequest request)
        {
            return ((IConfigurationService)this.ConfigurationService).RemoveAllPublishers(request);
        }

        #endregion IConfigurationService

        #region IConfigurationServiceOneWay

        void IConfigurationServiceOneWay.AddOrUpdateSubscribers(AddOrUpdateSubscribersRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).AddOrUpdateSubscribers(request);
        }

        void IConfigurationServiceOneWay.RemoveSubscribers(RemoveSubscribersRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).RemoveSubscribers(request);
        }

        void IConfigurationServiceOneWay.RemoveSubscriptions(RemoveSubscriptionsRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).RemoveSubscriptions(request);
        }

        void IConfigurationServiceOneWay.AddOrUpdatePublishers(AddOrUpdatePublishersRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).AddOrUpdatePublishers(request);
        }

        void IConfigurationServiceOneWay.RemovePublishers(RemovePublishersRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).RemovePublishers(request);
        }

        void IConfigurationServiceOneWay.RemoveReceivePorts(RemoveReceivePortsRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).RemoveReceivePorts(request);
        }

        void IConfigurationServiceOneWay.RemoveAllSubscribers(RemoveAllSubscribersRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).RemoveAllSubscribers(request);
        }

        void IConfigurationServiceOneWay.RemoveAllPublishers(RemoveAllPublishersRequest request)
        {
            ((IConfigurationServiceOneWay)this.ConfigurationService).RemoveAllPublishers(request);
        }

        #endregion IConfigurationServiceOneWay
    }
}